<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>两栏布局的多种方法</title>
    <style>
        .right {
            overflow: auto;
            border: 5px solid #ddd;
        }

        .left {
            margin-right: 20px;
            float: left;
            width: 120px;
            border: 5px solid #ddd;
        }

        #wrapper {
            overflow: auto;
            padding: 15px 20px;
            border: 1px dashed #ff6c60;
        }
    </style>
</head>

<body>
    <div id="wrapper">
        <div class="left">左边固定宽度，高度不固定
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            沙发就开始打
        </div>
        <div class="right">这里的内容可能比左侧高，也可能比左侧低。宽度需要自适应。</div>
    </div>
</body>

</html>